home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 32 / Mac Magazin and MacEasy Magazine CD - Issue 32.iso / Grafik & Text / OzTeX3.0 / TeX-inputs / LaTeX / graphics / pctexps.def < prev    next >
Text File  |  1997-03-07  |  4KB  |  126 lines

  1. %%
  2. %% This is file `pctexps.def',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% drivers.dtx  (with options: `pctexps,color3,colorfix')
  8. %% 
  9. %% drivers.dtx Copyright (C) 1994      David Carlisle Sebastian Rahtz
  10. %%             Copyright (C) 1995 1996 David Carlisle
  11. %%
  12. %% This file is part of the Standard LaTeX `Graphics Bundle'.
  13. %%
  14. %% It should be distributed *unchanged* and together with all other
  15. %% files in the graphics bundle. The file 00readme.txt contains a list
  16. %% of all of these files.
  17. %%
  18. %% A modified version of this file may be distributed, but it should
  19. %% be distributed with a *different* name. Changed files must be
  20. %% distributed *together with a complete and unchanged* distribution
  21. %% of these files.
  22. %%
  23. \ProvidesFile{pctexps.def}
  24.         [1996/12/12 v3.0d Driver-dependant file (DPC,SPQR)]
  25. \def\c@lor@arg#1{%
  26.   \dimen@#1\p@
  27.   \ifdim\dimen@<\z@\dimen@\maxdimen\fi
  28.   \ifdim\dimen@>\p@
  29.     \PackageError{color}{Argument `#1' not in range [0,1]}\@ehd
  30.   \fi}
  31. \def\color@gray#1#2{%
  32.   \c@lor@arg{#2}%
  33.   \edef#1{#2 setgray}%
  34.   }
  35. \def\color@cmyk#1#2{\c@lor@@cmyk#2\@@#1}
  36. \def\c@lor@@cmyk#1,#2,#3,#4\@@#5{%
  37.   \c@lor@arg{#4}%
  38.   \c@lor@arg{#1}%
  39.   \c@lor@arg{#2}%
  40.   \c@lor@arg{#3}%
  41.   \edef#5{#1 #2 #3 #4 setcmykcolor}%
  42.   }
  43. \def\color@rgb#1#2{\c@lor@@rgb#2\@@#1}
  44. \def\c@lor@@rgb#1,#2,#3\@@#4{%
  45.   \c@lor@arg{#1}%
  46.   \c@lor@arg{#2}%
  47.   \c@lor@arg{#3}%
  48.   \edef#4{#1 #2 #3 setrgbcolor}%
  49.   }
  50. \def\color@RGB#1#2{\c@lor@@RGB#2\@@#1}
  51. \def\c@lor@@RGB#1,#2,#3\@@#4{%
  52.  \c@lor@RGB@rgb{#1}\@tempa
  53.  \c@lor@RGB@rgb{#2}\@tempb
  54.  \c@lor@RGB@rgb{#3}\@tempc
  55.  \c@lor@@rgb\@tempa,\@tempb,\@tempc\@@#4%
  56.   }
  57. \def\c@lor@RGB@rgb#1#2{%
  58.   \dimen@#1\p@
  59.   \divide\dimen@\@cclv
  60.   \edef#2{\strip@pt\dimen@}}
  61. \def\color@hsb#1#2{\c@lor@@hsb#2\@@#1}
  62. \def\c@lor@@hsb#1,#2,#3\@@#4{%
  63.   \c@lor@arg{#1}%
  64.   \c@lor@arg{#2}%
  65.   \c@lor@arg{#3}%
  66.   \edef#4{#1 #2 #3 sethsbcolor}%
  67.   }
  68. \def\color@named#1#2{\c@lor@@named#2,,\@@#1}
  69. \def\c@lor@@named#1,#2,#3\@@#4{%
  70.   \@ifundefined{col@#1}%
  71.     {\PackageError{color}{Undefined color `#1'}\@ehd}%
  72.   {\edef#4{\csname col@#1\endcsname}}%
  73.   }
  74. \def\c@lor@to@ps#1\@@{#1}
  75. \def\current@color{0 setgray}
  76. \def\set@color{%
  77.   \Gin@PS@raw{\current@color}\aftergroup\reset@color}
  78. \def\reset@color{\Gin@PS@raw{\current@color}}
  79. \def\set@page@color{%
  80.   \c@lor@special\sixt@@n{background color ignored: \current@color}}
  81. \def\define@color@named#1#2{%
  82.   \expandafter\edef\csname col@#1\endcsname{#2}}
  83. \AtBeginDocument{%
  84.   \let\@ldc@l@r\color
  85.   \def\color{\if@inlabel\leavevmode\fi\@ldc@l@r}%
  86.   \let\@lduseb@x\usebox
  87.   \def\usebox#1{\@lduseb@x{#1}\set@color}}
  88. \def\Ginclude@eps#1{%
  89. \message{<#1>}%
  90.    \ifGin@clip
  91.      \typeout{no clipping support in pctexps}%
  92.    \fi
  93.    \Gin@req@width.03515\Gin@req@width
  94.    \Gin@req@height.03515\Gin@req@height
  95.    \special{ps:#1\space x=\strip@pt\Gin@req@width cm,
  96.                         y=\strip@pt\Gin@req@height cm}}
  97. \def\Ginclude@ps#1{%
  98. \message{<#1>}%
  99.   \ifGin@clip
  100.     \typeout{no clipping support in pctexps}%
  101.   \fi
  102.   \hbox{\kern-\Gin@llx bp\raise-\Gin@lly bp\hbox{\special{ps:#1}}}%
  103.   \typeout{^^J%
  104. ---------------------------------------------------------^^J%
  105. .ps graphics without bounding box information cannot be^^J%
  106. scaled.  If the file actually contains the information,^^J%
  107. please rename the file to .eps file extension.^^J%
  108. ---------------------------------------------------------^^J}}
  109. \def\Gin@extensions{.eps,.ps}
  110. \@namedef{Gin@rule@.ps}#1{{ps}{.ps}{#1}}
  111. \@namedef{Gin@rule@.eps}#1{{eps}{.eps}{#1}}
  112. \def\Gin@PS@raw#1{\special{ps::#1}}
  113. \def\Grot@start{%
  114.  \special{ps::gsave currentpoint
  115.  currentpoint translate \Grot@angle\space
  116.  rotate neg exch neg exch translate}}
  117. \def\Grot@end{\special{ps:: currentpoint grestore moveto}}
  118. \def\Gscale@start{\special{ps:: currentpoint currentpoint translate
  119.   \Gscale@x\space \Gscale@y\space scale neg exch neg exch translate}}
  120. \def\Gscale@end{\special{ps::  currentpoint currentpoint translate
  121.   1 \Gscale@x\space div 1 \Gscale@y\space div scale
  122.   neg exch neg exch translate}}
  123. \endinput
  124. %%
  125. %% End of file `pctexps.def'.
  126.